window.addEventListener("DOMContentLoaded", function() {
	//locationDiv(document.getElementById("bottom-fixed"));
	jQuery.noConflict();
	jQuery(function($) {
		$("#header-fixed-div div:nth-of-type(1)").click(function() {
			$("#bottom-fixed").stop().slideToggle(300);

		});

	});

});

function locationDiv(obj, position = null, left = "", top = "", right = "", bottom = "") {
	try {

		if(obj) {
			let arr = [left, top, right, bottom];
			let posi = ["absolute", "relative", "fixed"];
			let fixed = getComputedStyle(obj, null).getPropertyValue("position");
			arr.forEach(function(ele, index) {
				if(!isNaN(parseFloat(ele))) {
					if(index == 1) {
						obj.style.left = parseFloat(ele) + "px";
					} else if(index == 2) {
						obj.style.top = parseFloat(ele) + "px";
					} else if(index == 3) {
						obj.style.right = parseFloat(ele) + "px";
					} else {
						obj.style.bottom = parseFloat(ele) + "px";
					}

				}

			});
			if(fixed.match(/static/gi)) { // 默认定位static，不是有效定位
				if(position !== null && posi.includes(position)) {
					obj.style.position = position;
					return;
				}
				obj.style.position = "absolute";

				return;
			} else if(fixed.match(/fixed/gi) || position.match(/fixed/gi)) {

			}
			// 有效定位的话就不用再进行定位设置了
			arr = posi = fixed = null;
		}

	} catch(err) {
		alert(err.message);
	}

}